#!/usr/bin/env python
# coding=utf-8
"""
@Author  : youjia - 卞志伟
@file    : house.py
@contact : bianzhiwei@iyoujia.com
@time    : 2019-09-06 14:54 
@Desc    : 
@Software: PyCharm
"""
import os
import sys

# 当前文件的路径
pwd, filename = os.path.split(os.path.abspath(__file__))
# 当前文件的父路径
father_path = os.path.abspath(os.path.dirname(pwd) + os.path.sep + ".")
# 当前文件的前两级目录
grader_father = os.path.abspath(os.path.dirname(pwd) + os.path.sep + "..")
sys.path.append(pwd)
sys.path.append(father_path)
sys.path.append(grader_father)


class House(object):
    house_id: int = None
    lodge_id: int = None
    online_time: str = None
    date_begin: str = None  # 关联投资人的时间
    date_relieve: str = None  # 关联投资人的时间
    lease_date_begin: str = None  # '租赁开始日期（房屋承租期限，开始日期')
    lease_date_end: str = None  # '租赁结束日期（房屋承租期限，结束日期')
    deposit: float = None  # '押金，单位分')
    other_fee: float = None  # '其他费用，单位分')
    agency_fee: float = None  # '中介费，单位分')
    property_fee: float = None  # '物业费，单位分')
    heating_fee: float = None  # '取暖费，单位分')
    net_fee: float = None  # '网络贷款费，单位分')
    house_product_type: int = None  # '房屋产品类型(10:标准房,20:严选房)')
    rent_grow_ratio: str = None  # '每年租金，以逗号隔开，单位元')
    rent_month: dict = None  # 每个月租金
    st: str = None  # 和投资人关联真正开始时间
    et: str = None  # 和投资人关联真正结束时间
    own: int = None

    def __repr__(self):
        return "house_id:(dtype:{}){}\n".format(type(self.house_id), self.house_id) + \
               "lodge_id:(dtype:{}){}\n".format(type(self.lodge_id), self.lodge_id) + \
               "date_begin:(dtype:{}){}\n".format(type(self.date_begin), self.date_begin) + \
               "date_relieve:(dtype:{}){}\n".format(type(self.date_relieve), self.date_relieve) + \
               "lease_date_begin:(dtype:{}){}\n".format(type(self.lease_date_begin), self.lease_date_begin) + \
               "lease_date_end:(dtype:{}){}\n".format(type(self.lease_date_end), self.lease_date_end) + \
               "deposit:(dtype:{}){}\n".format(type(self.deposit), self.deposit) + \
               "other_fee:(dtype:{}){}\n".format(type(self.other_fee), self.other_fee) + \
               "agency_fee:(dtype:{}){}\n".format(type(self.agency_fee), self.agency_fee) + \
               "property_fee:(dtype:{}){}\n".format(type(self.property_fee), self.property_fee) + \
               "heating_fee:(dtype:{}){}\n".format(type(self.heating_fee), self.heating_fee) + \
               "net_fee:(dtype:{}){}\n".format(type(self.net_fee), self.net_fee) + \
               "rent_grow_ratio:(dtype:{}){}\n".format(type(self.rent_grow_ratio), self.rent_grow_ratio) + \
               "rent_month:(dtype:{}){}\n".format(type(self.rent_month), self.rent_month) + \
               "st:(dtype:{}){}\n".format(type(self.st), self.st) + \
               "et:(dtype:{}){}\n".format(type(self.et), self.et) + \
               "own:(dtype:{}){}\n\n\n\n".format(type(self.own), self.own)
